package com.ihg.hiex.admin.entity.dto;

/**
 * 
 * @author mohanlan
 *
 */
public class OperationsManagement {
	
	private String assessorEvalution;
    
    private String internalBenchmark;
    
    private String externalBenchmark;
    
    private int dxwt;
    
    private int gzgl;
    
    private int cgch;
    
    private int csbz;

    private int tcxf;
    
    private int hc;
    
    private int zcjc;
    
    private int potential;
    
    /**
     * The default constructor
     */
    public OperationsManagement() {
	}
	
    /**
     * 
     * @param dxwt
     * @param gzgl
     * @param cgch
     * @param csbz
     * @param tcxf
     * @param hc
     * @param zcjc
     */
    public OperationsManagement(int dxwt, int gzgl, int cgch, int csbz, int tcxf, int hc, int zcjc) {
    	this.dxwt = dxwt;
    	this.gzgl = gzgl;
    	this.cgch = cgch;
    	this.csbz = csbz;
    	this.tcxf = tcxf;
    	this.hc = hc;
    	this.zcjc = zcjc;
    	
    	double po = (dxwt + gzgl + csbz + tcxf + hc + zcjc) * 0.125
                + (cgch) * 0.25;
    	
    	if(po > new Double(7.00)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.57)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.29)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.86)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.43)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.14)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.71)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.43)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.00)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
    	
        //this.potential = new Double(po).intValue();
    	
    }
    
    /**
     * 
     * @param assessorEvalution
     * @param internalBenchmark
     * @param externalBenchmark
     * @return
     */
    public OperationsManagement init(String assessorEvalution, String internalBenchmark, String externalBenchmark) {
        this.assessorEvalution = assessorEvalution;
        this.internalBenchmark = internalBenchmark;
        this.externalBenchmark = externalBenchmark;
        return this;
    }

    /**
     * 
     * @param dxwt
     * @param gzgl
     * @param cgch
     * @param csbz
     * @param tcxf
     * @param hc
     * @param zcjc
     * @return
     */
    public OperationsManagement init(int dxwt, int gzgl, int cgch, int csbz, int tcxf, int hc, int zcjc) {
    	this.dxwt = dxwt;
    	this.gzgl = gzgl;
    	this.cgch = cgch;
    	this.csbz = csbz;
    	this.tcxf = tcxf;
    	this.hc = hc;
    	this.zcjc = zcjc;
    	
    	double po = (gzgl + gzgl + csbz + tcxf + hc + zcjc) * 0.125
                + (dxwt) * 0.25;
        //this.potential = new Double(po).intValue();
    	
    	if(po > new Double(7.00)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.57)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.29)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.86)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.43)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.14)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.71)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.43)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.00)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
    	
        return this;
    }

	public String getAssessorEvalution() {
		return assessorEvalution;
	}

	public void setAssessorEvalution(String assessorEvalution) {
		this.assessorEvalution = assessorEvalution;
	}

	public String getInternalBenchmark() {
		return internalBenchmark;
	}

	public void setInternalBenchmark(String internalBenchmark) {
		this.internalBenchmark = internalBenchmark;
	}

	public String getExternalBenchmark() {
		return externalBenchmark;
	}

	public void setExternalBenchmark(String externalBenchmark) {
		this.externalBenchmark = externalBenchmark;
	}

	public int getDxwt() {
		return dxwt;
	}

	public void setDxwt(int dxwt) {
		this.dxwt = dxwt;
	}

	public int getGzgl() {
		return gzgl;
	}

	public void setGzgl(int gzgl) {
		this.gzgl = gzgl;
	}

	public int getCgch() {
		return cgch;
	}

	public void setCgch(int cgch) {
		this.cgch = cgch;
	}

	public int getCsbz() {
		return csbz;
	}

	public void setCsbz(int csbz) {
		this.csbz = csbz;
	}

	public int getTcxf() {
		return tcxf;
	}

	public void setTcxf(int tcxf) {
		this.tcxf = tcxf;
	}

	public int getHc() {
		return hc;
	}

	public void setHc(int hc) {
		this.hc = hc;
	}

	public int getZcjc() {
		return zcjc;
	}

	public void setZcjc(int zcjc) {
		this.zcjc = zcjc;
	}

	public int getPotential() {
		return potential;
	}

	public void setPotential(int potential) {
		this.potential = potential;
	}
}
